package com.tjetc.controller;
import com.tjetc.domain.Province;
import com.tjetc.service.impl.ProvinceServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* (province)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/province")
public class ProvinceController {
/**
* 服务对象
*/
@Resource
private ProvinceServiceImpl provinceServiceImpl;

/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("selectOne")
public Province selectOne(Integer id) {
return provinceServiceImpl.selectByPrimaryKey(id);
}

@RequestMapping("getAll")
public List<Province> getAll() {
    return provinceServiceImpl.listAll();
}


}
